package org.wisteria.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wisteria.demo.service.ConfigProperty;
import org.wisteria.framework.web.APIResult;

@RestController
public class ConfigController {
    @Autowired
    ConfigProperty configProperty;

    @GetMapping("/author")
    public APIResult<String> getConfigAuthor() {
        return APIResult.success(null);
    }

    @GetMapping("/city")
    public APIResult getConfigCity() {
        return APIResult.success(configProperty.getCity());
    }
}
